﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace DPS.Prototype.PolicyBase.Filters.WorkOrderFilters
{
    public class ContinuityModelsFilter : WorkOrderFiltersBase
    {
        protected override List<Model.WorkOrder> FilterProcess(List<Model.WorkOrder> matchedOrders, ProdCompetitorBase prodCompetitor)
        {
            if (string.IsNullOrEmpty(prodCompetitor.LastProducedModelName))
            {
                return matchedOrders;
            }
            else
            {
                return matchedOrders.Where(order => order.Model == prodCompetitor.LastProducedModelName).ToList();
            }
        }
    }
}
